home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Demos / ByCompany / iXpoint / QMSprint / QMSprint.app / qfilter.header < prev    next >
Text File  |  1994-01-18  |  1KB  |  69 lines

  1. #!/bin/sh
  2.  
  3. # Copyright (C) 1992 QMS, Inc
  4.  
  5. #
  6. # Save the stdin under an arbitrary (unused) file descriptor so
  7. # we don't lose the input before we need it
  8. #
  9.  
  10. exec 5<&0
  11. exec 0</dev/null
  12.  
  13. #
  14. # Make sure we clean up after ourselves if we receive an interrupt
  15. #
  16. trap 'rm $PROLOGUE; echo "Spooler terminated communication" 1>&2; exit 2' 2
  17. trap 'rm $PROLOGUE; echo "Filter received a signal! Quit!" 1>&2; exit 2' 1 3  15
  18.  
  19. PATH=/bin:/usr/bin:/usr/ucb:/etc:/usr/etc
  20. export PATH
  21.  
  22.  
  23. #
  24. # Create prologue file name for Document Option Command header
  25. #
  26.  
  27. PROLOGUE=/tmp/$$qprologue
  28.  
  29. #
  30. # Set default variables
  31. #
  32.  
  33. USER=UNKNOWN
  34. HOST=`hostname`
  35. DATE=`date`
  36.  
  37.     # Sleep time (in seconds) to wait for emulation timeout (Parallel or
  38.     # Serial Comm)
  39. EM_TIMEOUT=5
  40.  
  41. #
  42. # Parse off the command line for the login and host information
  43. #
  44.  
  45. for i
  46. do      case $1 in
  47.         -n)     USER=${2-$USER}
  48.                 shift
  49.                 ;;
  50.         -n*)    USER=`echo $1 | sed "s/^..//"`
  51.                 ;;
  52.         -h)     HOST=${2-$HOST}
  53.                 shift
  54.                 ;;
  55.         -h*)    HOST=`echo $1 | sed "s/^..//"`
  56.         ;;
  57.         *)
  58.                 ;;
  59.         esac
  60.         if test $# -gt 0
  61.         then    shift
  62.         fi
  63. done
  64.  
  65. #
  66. # Configuration dependent variables
  67. #
  68.  
  69.